/*
 *@Author: 张楚
 *@Date: 2021-08-17 15:38:02
 *@Description: 抽离出来公文详情
*/
import 'package:flutter/material.dart';
import 'package:totaldemo/utils/util.dart';

class Demoss extends StatefulWidget {
  //发布者名字
  String publishUserName;
  //发件人意见
  String opinion;
  //份号
  String copyNum;

  //紧急程度,1为特急,2为急件,3为平件
  int emergencyType;
  //机密等级,1为绝密，2为机密，3为秘密
  int secretType;
  //保密期限，为多少年
  int secretDeadline;
  //发文机关
  String documentOffice;
  //公文标志
  String mark;
  //发文字号
  String postName;
  //公文标题
  String documentTitle;
  //内容
  String documentContent;
  //发文日期
  String publishDate;

  Demoss({Key key}) : super(key: key);
  @override
  _DemossState createState() => _DemossState();
}

class _DemossState extends State<Demoss> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('ss'),
      ),
      body: SingleChildScrollView(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.end,
          children: [
            Padding(
              padding:
                  EdgeInsets.only(top: 20, bottom: 18, right: 14, left: 15),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text(
                        '转发内容',
                        style: TextStyle(
                            fontSize: 14,
                            color: Color(0xff333333),
                            fontWeight: FontWeight.w500),
                      ),
                      Icon(
                        Icons.keyboard_arrow_right,
                        color: Color(0xff999999),
                        size: 20,
                      )
                    ],
                  ),
                  Padding(
                    padding: const EdgeInsets.symmetric(vertical: 10),
                    child: RichText(
                        text: TextSpan(
                            // style: DefaultTextStyle.of(context).style,
                            style: TextStyle(
                              fontSize: 12,
                              color: Color(0xff999999),
                            ),
                            children: [
                          TextSpan(
                            text: '来自于:',
                          ),
                          TextSpan(
                            text: '    向国庆',
                          ),
                        ])),
                  ),
                  DefaultTextStyle(
                    style: TextStyle(
                      fontSize: 12,
                      color: Color(0xff999999),
                    ),
                    child: Row(
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: [
                        Text('发件人意见:'),
                        SizedBox(
                          width: 10,
                        ),
                        Expanded(
                          child: Padding(
                            padding: EdgeInsets.only(right: 20),
                            child: Text(
                              '16465465s465as4d65as4d65as4d65as4d65as4d65a4d65a4d654a65d4a65d4a65d46a54d654',
                              overflow: TextOverflow.ellipsis,
                              maxLines: 1,
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                ],
              ),
            ),

            //公文内容部分
            Container(
                // color: colos,
                height: 81,
                decoration: BoxDecoration(
                  border: Border(
                    right: BorderSide.none,
                    left: BorderSide.none,
                    top: BorderSide(
                        color: Color(0x30666666),
                        width: 1,
                        style: BorderStyle.solid),
                    bottom: BorderSide(
                        color: Color(0x30666666),
                        width: 1,
                        style: BorderStyle.solid),
                  ),
                ),
                child: Stack(
                  children: [
                    Positioned(
                        top: -2,
                        right: 0,
                        child: Image.asset(
                          Util.getUrl('official_detail_urgent_one.png'),
                          width: 45,
                          height: 45,
                        )),
                    Padding(
                      padding: EdgeInsets.only(
                          top: 20, bottom: 20, right: 15, left: 15),
                      child: Column(
                        children: [
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '00000001',
                                style: TextStyle(
                                  fontSize: 12,
                                  color: Color(0xff666666),
                                ),
                              ),
                              Text(
                                '机密一年',
                                style: TextStyle(
                                  color: Color(0xff666666),
                                  fontSize: 12,
                                ),
                              ),
                            ],
                          ),
                          SizedBox(
                            height: 5,
                          ),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.end,
                            children: [
                              Text(
                                '特急',
                                style: TextStyle(
                                  color: Color(0xffff0000),
                                  fontSize: 12,
                                ),
                              ),
                            ],
                          ),
                        ],
                      ),
                    )
                  ],
                )),

            //内容标题部分
            Container(
              padding: EdgeInsets.symmetric(horizontal: 70),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Text(
                    '国务院文件',
                    style: TextStyle(
                      fontSize: 14,
                      fontWeight: FontWeight.w500,
                      color: Color(0xffFF534B),
                    ),
                  ),
                  Padding(
                    padding: const EdgeInsets.only(top: 4, bottom: 10),
                    child: Text(
                      '国函〔2014〕28号',
                      style: TextStyle(
                        fontSize: 12,
                        fontWeight: FontWeight.w500,
                        color: Color(0xff666666),
                      ),
                    ),
                  ),
                  Text(
                    '国务院关于同意建立不动产登记工作部际联席会议制度的批复',
                    textAlign: TextAlign.center,
                    style: TextStyle(
                      fontSize: 14,
                      color: Color(0xff333333),
                    ),
                  ),
                ],
              ),
            ),
            //内容--
            // Padding(
            //   padding: EdgeInsets.only(top: 5, right: 16, left: 12),
            //   child: Column(
            //     crossAxisAlignment: CrossAxisAlignment.start,
            //     children: [
            //       Text(
            //         '国土资源部：　',
            //         style: TextStyle(
            //           fontSize: 14,
            //           color: Color(0xff333333),
            //         ),
            //       ),
            //       SizedBox(
            //         height: 10,
            //       ),
            //       Text(
            //         '　  你部《关于建立不动产登记工作部际联席会议制度有关问题的请示》（国土资发〔2014〕15号）收悉。现批复如下：',
            //         style: TextStyle(
            //           fontSize: 14,
            //           color: Color(0xff666666),
            //         ),
            //       ),
            //       Padding(
            //         padding: const EdgeInsets.only(top: 5, bottom: 19),
            //         child: Text(
            //           '      同意建立由国土资源部牵头的不动产登记工作部际联席会议制度。联席会议不刻制印章，不正式行文，请按照国务院有关文件精神认真组织开展工作',
            //           style: TextStyle(
            //             fontSize: 14,
            //             color: Color(0xff333333),
            //           ),
            //         ),
            //       ),
            //     ],
            //   ),
            // ),
            //查看节点

            //内容2
            Padding(
              padding: EdgeInsets.only(left: 15, right: 15),
              child: Text('data'),
            ),
            Container(
              padding: const EdgeInsets.only(right: 18),
              child: DefaultTextStyle(
                style: TextStyle(fontSize: 14, color: Color(0xff333333)),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.end,
                  // mainAxisAlignment: MainAxisAlignment.end,
                  children: [
                    Text('国务院'),
                    SizedBox(
                      height: 10,
                    ),
                    Text('2020年12月28日'),
                  ],
                ),
              ),
            ),
            //底部附件
            Container(
              // margin: EdgeInsets.only(left: 18, right: 14),
              child: Column(
                children: [
                  Padding(
                    padding: EdgeInsets.only(left: 18, right: 14),
                    child: Row(
                      children: [
                        Icon(Icons.attach_email, size: 20),
                        Expanded(
                            child: Text('不动产登记工作部际联席会议动产登记工作部际作部际作部际联席会议制制度',
                                overflow: TextOverflow.ellipsis,
                                style: TextStyle(
                                    fontSize: 14, color: Color(0xff666666)))),
                        TextButton(
                            onPressed: () {},
                            child: Text(
                              '查看',
                              style: TextStyle(
                                  fontSize: 14,
                                  decoration: TextDecoration.underline,
                                  color: Color(0xff2CA0FF)),
                            ))
                      ],
                    ),
                  ),
                  Container(
                    padding: EdgeInsets.only(left: 18, right: 14),
                    height: 44,
                    color: Color(0xffE7E8F3),
                    child: DefaultTextStyle(
                      style: TextStyle(
                        fontSize: 14,
                        color: Color(0xff373F9B),
                      ),
                      child: Row(
                        // mainAxisAlignment: MainAxisAlignment.center,
                        // crossAxisAlignment: CrossAxisAlignment.center,
                        children: [
                          Icon(
                            Icons.ac_unit,
                            size: 20,
                          ),
                          Text('查看节点'),
                          Spacer(),
                          Icon(
                            Icons.message,
                            size: 20,
                          ),
                          Text('回复'),
                          SizedBox(width: 20),
                          Icon(
                            Icons.ac_unit,
                            size: 20,
                          ),
                          Text('转发'),
                        ],
                      ),
                    ),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
